<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend style="display: block">{$index+1}.{$label}</legend>
</fieldset>
<div class="layui-form-item">
    {foreach $list as $i=>$l}
    <div class="layui-input-block">
        <input type="checkbox" id="q{$index}_{$i}"  name="{$name}[]"  value="{$l['name']}"  title="{$l['name']}" >
    </div>
    {/foreach}
</div>